//
// phpIsUsableImageFile(theFilePath)
//
// Determines if the file is a GIF, JPG, or PNG.
//
// Returns:
//				0	File is a GIF, JPG, or PNG
//			  -1	Image is not a GIF, JPG, or PNG
//
Let (
	[
		$theFilePath = theFilePath;

		phpCode = "error_reporting(0); //(E_ALL & ~E_NOTICE);¶
		¶
		$theFilePath = fm_evaluate('$theFilePath');¶
		¶
		$imageInfo = getimagesize($theFilePath);¶
		¶
		if (($imageInfo[2] == IMG_GIF) || ($imageInfo[2] == IMG_JPG) || ($imageInfo[2] == IMG_PNG))¶
			$retVal = 0;¶
		else¶
			$retVal = -1;¶
		¶
		echo $retVal;¶
	  "
	] ;
	PHP_Execute(phpCode)
)